# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=xorg-luit
pkgver=1.1.1
pkgrel=4
pkgdesc="Filter that can be run between an arbitrary application and a UTF-8 terminal emulator"
arch=(x86_64)
url="https://xorg.freedesktop.org/"
license=('custom')
depends=('libfontenc')
groups=('xorg' 'xorg-apps')
makedepends=('xorg-util-macros')
source=(https://xorg.freedesktop.org/archive/individual/app/luit-${pkgver}.tar.bz2
        git_fixes.diff)
sha512sums=('e834e89fca9987f6d82701f53d3c450cc64b93a804b11465b4a7ec5cb3a5c4ef30115df57dec3cbdbafa46e4a4f1bb4759b723123e2ff2f6b1c12207015638e6'
            '17fed669b708a6717b76b10392a86678ae8936e5df4941ac97674195c9c4939f4ce47d8a3003b5ab6d605ccf3078886bbad66c22d654c9688f487b98f4c86d55')

prepare() {
  cd luit-${pkgver}
  patch -Np1 -i "$srcdir"/git_fixes.diff
  autoreconf -vfi
}

build() {
  cd luit-${pkgver}
  ./configure --prefix=/usr
  make
}

package() {
  cd luit-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
}
